<template>
    <ul>
      <li v-for="(item,index) in childList" :key="index">
        <span>{{item.name}}</span>
        <span>{{item.explan}}</span>
        <span>
          <slot name="right" :i="index" :row="item"></slot>
        </span>
      </li>
    </ul>
</template>
<script>
export default {
  props:{
    childList: Array
  },
  setup(props) {
    const add = () => {
      console.log('我是组件的函数');
    }
    return {add}
  }
}
</script>
<style lang="scss" scoped>
  li{
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    border-bottom: 1px solid #999;
  }
</style>

